package org.cadad.test;

import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class TabTestActivity extends TabActivity {
    Resources mResources;
    TabHost mTabHost;
    static public Activity gActivity = null;
    @Override
    public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);
       mResources = getResources(); // Resource object to get Drawables
       mTabHost = getTabHost(); // The activity TabHost
       addTabUno();
       addTabDos();
       mTabHost.setCurrentTab(0);

    }	
    private void addTabUno() {
       Intent intent = new Intent(this, Tab_Uno.class);
       TabSpec spec = mTabHost.newTabSpec("Texto Tab1");
       spec.setIndicator("Tab1", mResources.getDrawable(android.R.drawable.ic_menu_agenda));
       spec.setContent(intent);
       mTabHost.addTab(spec);
    }
    private void addTabDos() {
      Intent intent = new Intent(this, Tab_Dos.class);
      TabSpec spec = mTabHost.newTabSpec("Texto Tab2");
      spec.setIndicator("Tab2", mResources.getDrawable(android.R.drawable.ic_menu_gallery));
      spec.setContent(intent);
      mTabHost.addTab(spec);
    }

}